<%@page import="action.YeepayService"%>
<%@page import="java.util.Map"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>服务器回调</title>
<%! String formatString(String text){
		return text==null ? "" : text.trim();
	}
%>
<%
	String responseMsg = request.getParameter("response");
	String customerId = request.getParameter("customerIdentification");

	Map<String,String> result = YeepayService.callback(responseMsg);
	
	String parentMerchantNo = formatString(result.get("parentMerchantNo"));
	String merchantNo = formatString(result.get("merchantNo"));
	String orderId = formatString(result.get("orderId"));
	String uniqueOrderNo = formatString(result.get("uniqueOrderNo"));
	String status = formatString(result.get("status"));
	String orderAmount = formatString(result.get("orderAmount"));
	String payAmount = formatString(result.get("payAmount"));
	String requestDate = formatString(result.get("requestDate"));
	String paySuccessDate = formatString(result.get("paySuccessDate"));
	
%>
</head>
<body>
<table align="center" style="border:solid 1px #107929; margin-top: 40px;  width: 1200px;">
		<tr>
		  	<th align="center" height="30" colspan="5" bgcolor="#6BBE18">
				服务器通知结果
			</th>
		</tr>
		<tr height="50">
			<td width="15%" align="center">商户编号&nbsp;:</td>
			<td width="30%" align="center"><%=parentMerchantNo %></td>
			<td width="20%">--parentMerchantNo</td>
		</tr>
		<tr height="50">
			<td width="15%" align="center">收款商户编号&nbsp;:</td>
			<td width="30%" align="center"><%=merchantNo %></td>
			<td width="20%">--merchantNo</td>
		</tr>
		<tr height="50">
			<td width="15%" align="center">商户订单号&nbsp;:</td>
			<td width="30%" align="center"><%=orderId %></td>
			<td width="20%">--orderId</td>
		</tr>
		<tr height="50">
			<td width="15%" align="center">易宝流水号&nbsp;:</td>
			<td width="30%" align="center"><%=uniqueOrderNo %></td>
			<td width="20%">--uniqueOrderNo</td>
		</tr>
		<tr height="50">
			<td width="15%" align="center">订单状态&nbsp;:</td>
			<td width="30%" align="center"><%=status %></td>
			<td width="20%">--status</td>
		</tr>
		<tr height="50">
			<td width="15%" align="center">订单金额&nbsp;:</td>
			<td width="30%" align="center"><%=orderAmount %></td>
			<td width="20%">--orderAmount</td>
		</tr>
		<tr height="50">
			<td width="15%" align="center">实付金额&nbsp;:</td>
			<td width="30%" align="center"><%=payAmount %></td>
			<td width="20%">--payAmount</td>
		</tr>
		<tr height="50">
			<td width="15%" align="center">请求时间&nbsp;:</td>
			<td width="30%" align="center"><%=requestDate %></td>
			<td width="20%">--requestDate</td>
		</tr>
		<tr height="50">
			<td width="15%" align="center">完成时间&nbsp;:</td>
			<td width="30%" align="center"><%=paySuccessDate%></td>
			<td width="20%">--paySuccessDate</td>
		</tr>
	</table>
</body>
</html>